import Vue from "vue"
import VueRouter from "vue-router"
import Main from '../pages/Main/MainFile'
import Order from '../pages/Order/OrderFile'
import Search from "../pages/Search/SearchFile"
import ProFile from '../pages/ProFile/ProFile'
import LoginFlie from '../pages/Login/LoginFlie'
import ShopFile from '../pages/Shop/ShopFile'
import ShopGoods from '../pages/Shop/ShopGoods/ShopGoods'
import ShopInfo from '../pages/Shop/ShopInfo/ShopInfo'
import ShopRatings from '../pages/Shop/ShopRatings/ShopRatings'
Vue.use(VueRouter)

export default new VueRouter({
    routes:[
        {
            path:'/main',
            component:Main,
            meta:{
                showFooter:true
            }
        },
        {
            path:'/order',
            component:Order,
            meta:{
                showFooter:true
            }
        },
        {
            path:'/search',
            component:Search,
            meta:{
                showFooter:true
            }
        },
        {
            path:'/proFile',
            component:ProFile,
            meta:{
                showFooter:true
            }
        },
        {
            path:'/login',
            component:LoginFlie
        },
        {
            path:'/',
            redirect:'/main'
        },
        {
            path:'/shop',
            component:ShopFile,
            meta:{
                showFooter:false
            },
            children:[
                {
                    path:'/',
                    redirect:'/shop/goods'
                },
                {
                    path:'/shop/goods',
                    component:ShopGoods,
                },
                {
                    path:'/shop/info',
                    component:ShopInfo,
                },
                {
                    path:'/shop/ratings',
                    component:ShopRatings,
                }


            ]
        },
    ]
})
